<?php

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;
class PurchaseOrderBackRoute
{
    public function map(Registrar $router)
    {
       $router->group(['middleware' =>[ 'web','auth','permissions.check'], 'namespace'=>'Backstage', 'prefix' =>'backstage/purchase-order/'], function ($router) {
           $router->get('add-purchase-order', [ 'uses' => 'PurchaseOrderController@addPurchaseOrderPage'])->name('get.purchase-order.purchase-order-list.add-purchase-order');
           $router->get('purchase-order-list', [ 'uses' => 'PurchaseOrderController@purchaseOrderListPage'])->name('get.purchase-order.purchase-order-list.list');
           $router->get('purchase-order-detail', [ 'uses' => 'PurchaseOrderController@purchaseOrderDetail'])->name('get.purchase-order.purchase-order-list.purchase-order-detail');
           $router->get('update-purchase-order', [ 'uses' => 'PurchaseOrderController@updatePurchaseOrderPage'])->name('get.purchase-order.purchase-order-list.update-purchase-order');
           $router->post('get-temps-by-supplier-id', [ 'uses' => 'PurchaseOrderController@getTempsBySupplierId'])->name('post.purchase-order.purchase-order-list.get-temps-by-supplier-id');
           $router->post('get-temp-stock-by-sku', [ 'uses' => 'PurchaseOrderController@getTempStockBySku'])->name('post.purchase-order.purchase-order-list.get-temp-stock-by-sku');
           $router->post('save', [ 'uses' => 'PurchaseOrderController@save'])->name('post.purchase-order.purchase-order-list.save');
           $router->post('update-status', [ 'uses' => 'PurchaseOrderController@updateStatus'])->name('post.purchase-order.purchase-order-list.update-status');
           $router->post('del-purchase-order', [ 'uses' => 'PurchaseOrderController@delPurchaseOrder'])->name('post.purchase-order.purchase-order-list.del-purchase-order');

           $router->post('del-purchase-order-map-by-sku', [ 'uses' => 'PurchaseOrderController@delPurchaseOrderMapBySku'])->name('post.purchase-order.purchase-order-list.del-purchase-order-map-by-sku');
           $router->post('add-purchase-order-map', [ 'uses' => 'PurchaseOrderController@addPurchaseOrderMap'])->name('post.purchase-order.purchase-order-list.add-purchase-order-map');
           $router->post('update-purchase-order', [ 'uses' => 'PurchaseOrderController@updatePurchaseOrder'])->name('post.purchase-order.purchase-order-list.update-purchase-order');
           $router->post('update-express', [ 'uses' => 'PurchaseOrderController@updatePurchaseOrderExpress'])->name('post.purchase-order.purchase-order-list.update-express');
           $router->post('export-excel', [ 'uses' => 'PurchaseOrderController@exportExcel'])->name('post.purchase-order.purchase-order-list.export-excel');
       });
    }
}